version 13.3R4.6;
groups {
    re0 {
        system {
            host-name MX104-RE0;
        }
        interfaces {
            fxp0 {
                description "-- out-of-band management interface";
                unit 0 {
                    family inet {
                        address 192.168.3.74/24;
                    }
                }
            }
        }
    }
    re1 {
        system {
            host-name MX104-RE1;
        }
        interfaces {
            fxp0 {
                description "-- out-of-band management interface";
                unit 0 {
                    family inet {
                        address 192.168.3.75/24;
                    }
                }
            }
        }
    }
    interface-standard {
        interfaces {
            <*> {
                mtu 9100;
                hold-time up 1000 down 0;
                gigether-options {
                    no-flow-control;
                }
            }
        }
    }
}
apply-groups [ re0 re1 ];
dynamic-profiles {
    IP-DHCP-PROFILE-1 {
        interfaces {
            "$junos-interface-ifd-name" {
                unit "$junos-underlying-interface-unit";
            }
        }
    }
    VLAN-PROFILE-1 {
        interfaces {
            "$junos-interface-ifd-name" {
                unit "$junos-interface-unit" {
                    description "-- Service IFL";
                    vlan-id "$junos-vlan-id";
                    family inet {
                        unnumbered-address lo0.0 preferred-source-address 192.168.0.1;
                    }
                }
            }
        }
    }
}
system {
    time-zone Europe/Moscow;
    arp {
        aging-timer 240;
        purging;
        gratuitous-arp-on-ifup;
        gratuitous-arp-delay 3;
    }
    root-authentication {
        encrypted-password "$1$UVQ1EG6U$tqUwtI0IcS4PueWRlSKlD."; ## SECRET-DATA
    }
    dynamic-profile-options {
        versioning;
    }
    login {
        user va {
            full-name "-- Vladislav Abramov @Juniper";
            uid 2003;
            class super-user;
            authentication {
                encrypted-password "$1$sUJQDKAW$p8i2/fpLPFX9pSRoK11Ff1"; ## SECRET-DATA
            }
        }
        user warrior {
            full-name "-- Matvey Alexandrov @Juniper";
            uid 2001;
            class super-user;
            authentication {
                encrypted-password "$1$uhOE97qw$oYrsgslCll5p/gtJtJsIt1"; ## SECRET-DATA
            }
        }
    }
    services {
        ftp;
        ssh;
        telnet;
        dhcp-local-server {
            pool-match-order {
                ip-address-first;
            }
            authentication {
                password 123;
                username-include {
                    mac-address;
                }
            }
            dynamic-profile IP-DHCP-PROFILE-1;
            group 1 {
                interface ps0.0;
            }
        }
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
            interactive-commands none;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
    commit synchronize;
}
chassis {
    redundancy {
        graceful-switchover;
    }
    pseudowire-service {
        device-count 1;
    }
    fpc 0 {
        pic 1 {
            tunnel-services {
                bandwidth 10g;
            }
        }
    }
    alarm {
        management-ethernet {
            link-down ignore;
        }
        ethernet {
            link-down ignore;
        }
    }
    network-services enhanced-ip;
}
access-profile AP1;
interfaces {
    xe-0/0/0 {
        apply-groups interface-standard;
        description "-- P router 3/0/1";
        flexible-vlan-tagging;
        encapsulation flexible-ethernet-services;
        unit 90 {
            vlan-id 90;
            family inet {
                address 192.168.100.10/30;
            }
            family iso;
            family mpls;
        }
    }
    ge-1/0/0 {
        apply-groups interface-standard;
        description "-- TG 10/12";
        flexible-vlan-tagging;
        encapsulation flexible-ethernet-services;
    }
    lo0 {
        unit 0 {
            description "-- loopback";
            family inet {
                address 3.3.3.3/32 {
                    primary;
                }
                address 192.168.0.1/32;
            }
            family iso {
                address 49.0001.0030.0300.3003.00;
            }
        }
    }
    ps0 {
        description "-- (P)seudowire (S)ervice interface";
        anchor-point {
            lt-0/1/0;
        }
        flexible-vlan-tagging;
        auto-configure {
            vlan-ranges {
                dynamic-profile VLAN-PROFILE-1 {
                    accept dhcp-v4;
                    ranges {
                        any;
                    }
                }
            }
            remove-when-no-subscribers;
        }
        mtu 9192;
        mac 00:11:22:33:44:55;
        unit 0 {
            description "-- Transport IFL";
            encapsulation ethernet-ccc;
        }
    }
}
routing-options {
    static {
        route 172.17.0.20/32 {
            next-hop 192.168.3.3;
            no-readvertise;
        }
    }
    router-id 3.3.3.3;
    forwarding-table {
        export pp-balance;
    }
}
protocols {
    mpls {
        no-propagate-ttl;
        interface xe-0/0/0.90;
    }
    isis {
        reference-bandwidth 1000g;
        level 1 disable;
        level 2 wide-metrics-only;
        interface xe-0/0/0.90 {
            level 2 {
                hello-interval 3;
                hold-time 9;
            }
        }
        interface lo0.0 {
            passive;
        }
    }
    ldp {
        track-igp-metric;
        interface xe-0/0/0.90;
        interface lo0.0;
    }
    l2circuit {
        neighbor 1.1.1.1 {
            interface ps0.0 {
                virtual-circuit-id 123;
                ignore-mtu-mismatch;
                no-vlan-id-validate;
                pseudowire-status-tlv;
            }
        }
    }
    lldp {
        interface all;
    }
}
policy-options {
    policy-statement nhs {
        term 1 {
            then {
                next-hop self;
            }
        }
    }
    policy-statement pp-balance {
        then {
            load-balance per-packet;
        }
    }
}
access {
    radius-server {
        172.17.0.20 {
            port 1812;
            accounting-port 1813;
            secret "$9$aVUkPF39pu1FntOBIle"; ## SECRET-DATA
            timeout 5;
            retry 3;
            max-outstanding-requests 100;
        }
    }
    profile AP1 {
        accounting-order radius;
        authentication-order radius;
        radius {
            authentication-server 172.17.0.20;
            accounting-server 172.17.0.20;
            options {
                nas-port-id-delimiter :;
                calling-station-id-delimiter :;
                calling-station-id-format {
                    nas-identifier;
                    interface-description;
                }
                accounting-session-id-format decimal;
                coa-dynamic-variable-validation;
            }
        }
        accounting {
            order radius;
            immediate-update;
            coa-immediate-update;
            update-interval 10;
            statistics volume-time;
        }
    }
    address-assignment {
        pool Pool-1 {
            family inet {
                network 192.168.0.0/24;
                range Range-1 {
                    low 192.168.0.101;
                    high 192.168.0.200;
                }
                dhcp-attributes {
                    maximum-lease-time 3600;
                    domain-name matvey.juniper.net;
                    name-server {
                        8.8.4.4;
                    }
                    router {
                        192.168.0.1;
                    }
                }
            }
        }
    }
}
